package items;

import java.util.ArrayList;


/*
 * Defines metal bars
 */
public enum Bars {
	AdBar ("Adamantite Bar", 2361),
	BzBar ("Bronze Bar", 2349),
	AuBar ("Gold Bar", 2357),
	FeBar ("Iron Bar", 2351),
	MiBar ("Mithril Bar", 2359),
	RuBar ("Rune Bar", 2363),
	AgBar ("Silver Bar", 2355),
	StBar ("Steel Bar", 2353);
	
	public static final String group = "bars";
	private String itemName;
	private int itemNumber;

	public int getItemNumber() {
		return itemNumber;
	}

	public void setItemNumber(int itemNumber) {
		this.itemNumber = itemNumber;
	}

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}

	Bars(String itemName, int itemNumber) {
		this.setItemName(itemName);
		this.setItemNumber(itemNumber);
	}

	@Override
	public String toString() {
		Number string = getItemNumber();
		return string.toString();
	}
	
	public static boolean itemCategory(String category) {
		return category.equalsIgnoreCase("bars") ? true : false;
	}
	
	public static ArrayList<String> itemNameList() {
		ArrayList<String> itemList = new ArrayList<String>();
		for(Bars items : Bars.values()) {
			itemList.add(items.getItemName());
		}
		return itemList;
	}
	
	public static ArrayList<String> itemNumberList() {
		ArrayList<String> itemNumberList = new ArrayList<String>();
		for(Bars items : Bars.values()) {
			itemNumberList.add(items.toString());
		}
		return itemNumberList;
	}
}
